package rule;

import java.util.Map;

/**
 * <p>
 * userName 判断规则
 * </P>
 *
 * @author dingwen
 * @date 2021.09.09 10:13
 */
public class UserNameRule extends AbstractBaseRule<Boolean, Map<String,String>>{

    private final String name;

    public UserNameRule(String name) {
        this.name = name;
    }


    @Override
    Boolean executeBoolean(RuleDto<Map<String, String>> ruleDto) {
          return name.equals(ruleDto.getValue().get(this.getClass().getSimpleName()));
    }
}
